
import 'flutter_wifi_connector_platform_interface.dart';

class FlutterWifiConnector {
  Future<String?> getPlatformVersion() {
    return FlutterWifiConnectorPlatform.instance.getPlatformVersion();
  }

  /// Connect to a WiFi network and save it permanently
  /// 
  /// [ssid] - The SSID (network name) of the WiFi network
  /// [password] - The password for the WiFi network
  /// 
  /// Returns a Map containing:
  /// - 'success': true if connection was successful, false otherwise
  /// - 'message': A message describing the result
  /// 
  /// This method saves the network configuration permanently to the device.
  /// The network will be available even after the app closes, just like
  /// manually adding WiFi through system settings.
  /// 
  /// Note: This method requires location permissions on Android.
  /// Use permission_handler package to request permissions before calling this method.
  Future<Map<String, dynamic>> connectToWifi(String ssid, String password) {
    return FlutterWifiConnectorPlatform.instance.connectToWifi(ssid, password);
  }
}
